package br.ufrn.sigtcc.controller.services;

import java.util.List;

import br.ufrn.sigtcc.controller.services.interfaces.IProfessorService;
import br.ufrn.sigtcc.data.DAOProfessorImpl;
import br.ufrn.sigtcc.data.interfaces.IDAOProfessor;
import br.ufrn.sigtcc.model.entidades.Professor;
import br.ufrn.sigtcc.util.exceptions.BDException;
import br.ufrn.sigtcc.util.exceptions.BusinessException;

public class ProfessorServiceImpl implements IProfessorService{
	
	IDAOProfessor daoProfessor = new DAOProfessorImpl();
	
	public ProfessorServiceImpl(IDAOProfessor dao) {
		this.daoProfessor = dao;
	}
	
	public ProfessorServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void cadastrarProfessor(Professor professor)
			throws BDException, BusinessException {
		
		this.daoProfessor.cadastrarProfessor(professor);
		
	}

	@Override
	public void removerProfessor(Professor professor)
			throws BDException, BusinessException {
		
		this.daoProfessor.removerProfessor(professor);
		
	}

	@Override
	public void atualizarAluno(Professor professor) throws BDException,
			BusinessException {

		this.daoProfessor.atualizarProfessor(professor);
		
	}

	@Override
	public List<Professor> listarTodosProfessores() throws BDException {
		
		return this.daoProfessor.listarProfessores();
	}
}
